package com.headStorm.hutooluse;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONObject;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zhangqq
 * @create 2021-12-14 11:27
 **/
public class BeanUtilUseDemo {

    public static void main(String[] args) {
        List<JSONObject> flightPaths = new ArrayList<>();


        JSONObject flightPath = new JSONObject();
        flightPath.putOnce("name", "zhangqq");

        flightPaths.add(flightPath);

        Map<String, Object> map = new HashMap<>();
        map.put("flightPaths", flightPaths);
        System.out.println(BeanUtil.getProperty(flightPaths, "flightPaths[0].name.name").toString());
    }
}
